<?php
/**
 * Created by PhpStorm.
 * User: 邓伟强
 * Date: 2017/8/25
 * Time: 9:19
 */

namespace Admin\Controller;


use Think\Controller;

class CategoryController extends Controller
{
    public function index(){
        $CateGory = M('category');
        $arr = $CateGory->order('sortlist')->select();
        $list = getChild($arr);
        $this->assign('list',$list);
        $this->display();
    }

    public function add(){
        $CateGory = M('category');
        $arr = $CateGory->order('sortlist')->select();
        $list = getChild($arr);
        $this->assign('list',$list);
        $this->display();
    }
}